package com.ittony.blog.mapper;

import com.ittony.blog.entity.ArticleCategoryRef;
import com.ittony.blog.entity.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticleCategoryRefMapper {

    int insert(ArticleCategoryRef record);

    int deleteByCategoryId(Integer categoryId);

    int deleteByArticleId(Integer articleId);

    int countArticleByCategoryId(Integer categoryId);

    List<Integer> selectCategoryIdByArticleId(Integer articleId);

    List<Integer> selectArticleIdByCategoryId(Integer categoryId);

    List<Category> listCategoryByArticleId(Integer articleId);
}
